package com.zhp.farmerclient.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.ToString;
import org.springframework.stereotype.Component;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;

@Data
@Component
@ToString
@TableName("user")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @NotBlank(message = "昵称不能为空")
    private String username;

    private String password;
    private String sex;
    private String address;
    private String phone;
    private String email;

//    //描述用户所发表的帖子
//    @TableField(exist = false)
//    private List<Post> postList;
}